import mockrequest from '../mock/index';
interface ResData {
    content: ResContentModel[];
    first: boolean;
    last: boolean;
    number: number;
    numberOfElements: number;
    offset: null;
    size: number;
    sort: null;
    statistics: null;
    totalElements: number;
    totalPages: number;
    useOffset: boolean;
}
export interface ResContentModel {
    momentSubject: string;
    creator: string;
    createTime: string | number;
    momentBackup: {
        vover: string[];
        creator: string;
        router: string;
        creatorBackup: {
            level: number;
            name: string;
            avatar: string;
            id: string;
            vipGrade: number;
        };
        momentClassificationBackup: {
            workTitle: string;
            classification: string;
        };
    };
    momentTitle: string;
    updateTime: number;
    id: string;
    momentId: string;
    isSelect: boolean;
}

export default {
    requirMyVideo(tag: any) {
        return mockrequest(`/trainingCenter/plans/search/findByUserId${tag ? '?' + tag : ''}`);
    },
    reqData() {
        return mockrequest<any, { code: number; data: ResData }>(
            '/moment/viewRecords?access_token=4a798935-9bba-40d6-851f-592d3874ea54&pageSize=10'
        );
    },
    getMineInfo(tag: any) {
        return mockrequest(
            `/trainingCenter/plans/search/findByUserId${
                tag ? '?' + tag + '&' : '?'
            }access_token=4a798935-9bba-40d6-851f-592d3874ea54&pageSize=20&pageNum=0&type=system`
        );
    },
    getDetailInfo(id: string) {
        return mockrequest('/detail/training?id=ff8080817b0b59bb017b16a69f2d4bae');
    },
};
